package com.lsq.tucao.express.controller;

import com.lsq.tucao.express.bean.po.Notice;
import com.lsq.tucao.express.response.JsonResult;
import com.lsq.tucao.express.service.NoticeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/notice")
public class NoticeController {

    @Autowired
    private NoticeService noticeService;

    @GetMapping
    public JsonResult getAllNotice(){
        return noticeService.getAllNotice();
    }

    @PutMapping
    public JsonResult updateNotice(@RequestBody Notice notice){
        return noticeService.updateNotice(notice);
    }

}
